#import <UIKit/UIKit.h>

#import "framework/FWDBAccess.h"

#import "PIEvent.h"


extern NSString* const kFieldNameEventStartDate;
extern NSString* const kFieldNameEventTagID;


@class SBApplication;
@class FWApplication;


@interface PIEventIntegration : NSObject <FWDBAccessDelegate>

+ (NSArray*)basicEventsList:(FWApplication*)application prefs:(FWPreferences*)prefs database:(FWDatabase*)database fromDate:(NSDate*)startDate toDate:(NSDate*)endDate;

+ (void)addAlarmDataToEventList:(FWApplication*)app database:(FWDatabase*)database events:(NSArray*)events prefs:(FWPreferences*)prefs;

+ (PIEvent*)augmentedBasicEvent:(PIEvent*)event application:(FWApplication*)app;

+ (NSDictionary*)nativeCalendarIcons:(FWApplication*)app database:(FWDatabase*)database calendars:(NSArray*)calendars;

+ (NSURL*)urlForShowEvent:(PIEvent*)event application:(FWApplication*)app;

+ (void)showInApplication:(PIEvent*)event application:(FWApplication*)app;


+ (PIEventIntegration*)implementationForApp:(FWApplication*)app;

- (NSMutableString*)basicEventsListSQL:(FWApplication*)application prefs:(FWPreferences*)prefs fromDate:(NSDate*)startDate toDate:(NSDate*)endDate;

- (NSString*)addAlarmDataToEventListSQL:(FWApplication*)app keys:(NSString*)keys prefs:(FWPreferences*)prefs;

- (NSString*)augmentedBasicEventSQL:(PIEvent*)event application:(FWApplication*)app;

- (NSString*)attendeesSQL:(PIEvent*)event application:(FWApplication*)app;

@end
